Optimal. Leaf size=215 \[ -\frac {\sin ^3(c+d x) \left (a^2 (4 A+5 C)+10 a b B+2 A b^2\right )}{15 d}+\frac {\sin (c+d x) \left (a^2 (4 A+5 C)+10 a b B+b^2 (4 A+5 C)\right )}{5 d}+\frac {\sin (c+d x) \cos (c+d x) \left (3 a^2 B+6 a A b+8 a b C+4 b^2 B\right )}{8 d}+\frac {1}{8} x \left (3 a^2 B+6 a A b+8 a b C+4 b^2 B\right )+\frac {a (5 a B+2 A b) \sin (c+d x) \cos ^3(c+d x)}{20 d}+\frac {A \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^2}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.51, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4094, 4074, 4047, 2635, 8, 4044, 3013} \[ -\frac {\sin ^3(c+d x) \left (a^2 (4 A+5 C)+10 a b B+2 A b^2\right )}{15 d}+\frac {\sin (c+d x) \left (a^2 (4 A+5 C)+10 a b B+b^2 (4 A+5 C)\right )}{5 d}+\frac {\sin (c+d x) \cos (c+d x) \left (3 a^2 B+6 a A b+8 a b C+4 b^2 B\right )}{8 d}+\frac {1}{8} x \left (3 a^2 B+6 a A b+8 a b C+4 b^2 B\right )+\frac {a (5 a B+2 A b) \sin (c+d x) \cos ^3(c+d x)}{20 d}+\frac {A \sin (c+d x) \cos ^4(c+d x) (a+b \sec (c+d x))^2}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3013
Rule 4044
Rule 4047
Rule 4074
Rule 4094
Rubi steps
\begin {align*} \int \cos ^5(c+d x) (a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {1}{5} \int \cos ^4(c+d x) (a+b \sec (c+d x)) \left (2 A b+5 a B+(4 a A+5 b B+5 a C) \sec (c+d x)+b (2 A+5 C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a (2 A b+5 a B) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {1}{20} \int \cos ^3(c+d x) \left (-4 \left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right )-5 \left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) \sec (c+d x)-4 b^2 (2 A+5 C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a (2 A b+5 a B) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {1}{20} \int \cos ^3(c+d x) \left (-4 \left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right )-4 b^2 (2 A+5 C) \sec ^2(c+d x)\right ) \, dx-\frac {1}{4} \left (-6 a A b-3 a^2 B-4 b^2 B-8 a b C\right ) \int \cos ^2(c+d x) \, dx\\ &=\frac {\left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (2 A b+5 a B) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {1}{20} \int \cos (c+d x) \left (-4 b^2 (2 A+5 C)-4 \left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right ) \cos ^2(c+d x)\right ) \, dx-\frac {1}{8} \left (-6 a A b-3 a^2 B-4 b^2 B-8 a b C\right ) \int 1 \, dx\\ &=\frac {1}{8} \left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) x+\frac {\left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (2 A b+5 a B) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {\operatorname {Subst}\left (\int \left (-4 b^2 (2 A+5 C)-4 \left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right )+4 \left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right ) x^2\right ) \, dx,x,-\sin (c+d x)\right )}{20 d}\\ &=\frac {1}{8} \left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) x+\frac {\left (10 a b B+a^2 (4 A+5 C)+b^2 (4 A+5 C)\right ) \sin (c+d x)}{5 d}+\frac {\left (6 a A b+3 a^2 B+4 b^2 B+8 a b C\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (2 A b+5 a B) \cos ^3(c+d x) \sin (c+d x)}{20 d}+\frac {A \cos ^4(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{5 d}-\frac {\left (2 A b^2+10 a b B+a^2 (4 A+5 C)\right ) \sin ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.77, size = 169, normalized size = 0.79 \[ \frac {60 (c+d x) \left (3 a^2 B+6 a A b+8 a b C+4 b^2 B\right )+60 \sin (c+d x) \left (a^2 (5 A+6 C)+12 a b B+2 b^2 (3 A+4 C)\right )+120 \sin (2 (c+d x)) \left (a^2 B+2 a b (A+C)+b^2 B\right )+10 \sin (3 (c+d x)) \left (a^2 (5 A+4 C)+8 a b B+4 A b^2\right )+6 a^2 A \sin (5 (c+d x))+15 a (a B+2 A b) \sin (4 (c+d x))}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 171, normalized size = 0.80 \[ \frac {15 \, {\left (3 \, B a^{2} + 2 \, {\left (3 \, A + 4 \, C\right )} a b + 4 \, B b^{2}\right )} d x + {\left (24 \, A a^{2} \cos \left (d x + c\right )^{4} + 30 \, {\left (B a^{2} + 2 \, A a b\right )} \cos \left (d x + c\right )^{3} + 16 \, {\left (4 \, A + 5 \, C\right )} a^{2} + 160 \, B a b + 40 \, {\left (2 \, A + 3 \, C\right )} b^{2} + 8 \, {\left ({\left (4 \, A + 5 \, C\right )} a^{2} + 10 \, B a b + 5 \, A b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (3 \, B a^{2} + 2 \, {\left (3 \, A + 4 \, C\right )} a b + 4 \, B b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.31, size = 720, normalized size = 3.35 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.57, size = 244, normalized size = 1.13 \[ \frac {\frac {a^{2} A \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+B \,a^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 A a b \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 B a b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 C a b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {A \,b^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b^{2} B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+b^{2} C \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 233, normalized size = 1.08 \[ \frac {32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a^{2} + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} + 30 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a b - 320 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a b + 240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a b - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A b^{2} + 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B b^{2} + 480 \, C b^{2} \sin \left (d x + c\right )}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.55, size = 256, normalized size = 1.19 \[ \frac {\frac {25\,A\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{2}+\frac {3\,A\,a^2\,\sin \left (5\,c+5\,d\,x\right )}{2}+30\,B\,a^2\,\sin \left (2\,c+2\,d\,x\right )+10\,A\,b^2\,\sin \left (3\,c+3\,d\,x\right )+\frac {15\,B\,a^2\,\sin \left (4\,c+4\,d\,x\right )}{4}+30\,B\,b^2\,\sin \left (2\,c+2\,d\,x\right )+10\,C\,a^2\,\sin \left (3\,c+3\,d\,x\right )+75\,A\,a^2\,\sin \left (c+d\,x\right )+90\,A\,b^2\,\sin \left (c+d\,x\right )+90\,C\,a^2\,\sin \left (c+d\,x\right )+120\,C\,b^2\,\sin \left (c+d\,x\right )+60\,A\,a\,b\,\sin \left (2\,c+2\,d\,x\right )+\frac {15\,A\,a\,b\,\sin \left (4\,c+4\,d\,x\right )}{2}+20\,B\,a\,b\,\sin \left (3\,c+3\,d\,x\right )+60\,C\,a\,b\,\sin \left (2\,c+2\,d\,x\right )+45\,B\,a^2\,d\,x+60\,B\,b^2\,d\,x+180\,B\,a\,b\,\sin \left (c+d\,x\right )+90\,A\,a\,b\,d\,x+120\,C\,a\,b\,d\,x}{120\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________